<template>
    <section class="top">
        <img class="head" src="../assets/default.png" />
        <span class="name" v-copy>chatGPT Plus web3.0.2版本</span>
        <span class="voice"><i class="chatGPT" aria-hidden="true"
                :class="cnStore.vociceOpen ? 'icon-volume-up' : 'icon-volume-down'" v-on:click="setVociceOpen"></i></span>
    </section>
</template>

<script>
export default {
    name: "heads",
    methods: {
        setVociceOpen() {
            this.cnStore.vociceOpen = this.cnStore.vociceOpen ? false : true
            if (!this.cnStore.vociceOpen && !(navigator.userAgent.indexOf("Edg") > -1)) this.cnToast.error("觉得难听请去edge浏览器");
        }
    }
};
</script>

<style scoped>
.chatGPT{
    font-weight: bold;
    font-size: 18px;
}

.top {
    height: 50px;
    line-height: 50px;
    position: absolute;
    top: 0px;
    left: 0px;
    right: 0px;
    background-color: #f8f8f8;
    padding: 5px 10px;
}

.top .head {
    width: 50px;
    height: 50px;
    float: left;
    border-radius: 100%;
}

.top .name {
    font-size: 18px;
    color: #444;
    margin-left: 10px;
}

.top .voice {
    width: 30px;
    height: 50px;
    float: right;
    text-align: center;
}
</style>
